package com.configs;


import lombok.Data;

@Data
public class Result {

    private Integer code;

    private String msg;

    private Object data;

    public Result() {

    }

    public Result(Integer code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static Result success(Object data) {
        return new Result(200, "操作成功", data);
    }


    public static Result error(Object data) {
        return new Result(500, "操作失败", data);
    }


}
